package com.example.test.chapter7.ratingbar;

import com.example.test.R;

import android.view.View;
import android.widget.RatingBar;
import android.widget.TextView;

public class ViewWrapper {
	private View base;
	private RatingBar rate = null;
	private TextView label = null;

	public ViewWrapper(View base) {
		this.base = base;
	}

	public RatingBar getRate() {
		if (rate == null) {
			rate = (RatingBar) base.findViewById(R.id.ratingbar);
		}
		return rate;
	}

	public TextView getLabel() {
		if (label == null) {
			label = (TextView) base.findViewById(R.id.label_rating);
		}
		return label;
	}
}
